package com.bkgy.controller.tbbxrecord.controller;

import com.bkgy.controller.tbbxrecord.service.ITbBxSyncService;
import com.bkgy.sys.common.entity.ResultData;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Tag(name = "同步宝信秒用时", description = "构建与修复记录")
@Controller
@RequestMapping("/bxSync")
@RequiredArgsConstructor
public class TbBxSyncController {

    private final ITbBxSyncService service;

    //单独补充某条记录
    @Operation(summary = "【构建同步单独一个编号的记录】")
    @PostMapping("/buildBxSync")
    @ResponseBody
    public ResultData<String> buildBxSync(String id) {
        return service.buildBxSync(id);
    }

    //构建一个时间区间的记录
    @Operation(summary = "【构建一个时间区间的记录】")
    @PostMapping("/buildBxQujSync")
    @ResponseBody
    public ResultData<String> buildBxQujSync(String beginDate, String endDate) {
        return service.buildBxQujSync(beginDate, endDate);
    }
}
